home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / CD32 / CD32_Support / SCSI_CD / Install < prev    next >
Encoding:
AmigaDOS Script File  |  1993-10-18  |  2.9 KB  |  100 lines

  1. .key none
  2. .bra {
  3. .ket }
  4.  
  5. failat 21
  6.  
  7. version >NIL: exec.library 40
  8. if warn
  9.     requestchoice >NIL: TITLE "" BODY "This software requires V40.*NNot installing." GADGETS OK
  10.     quit
  11. endif
  12.  
  13. if not exists installifnewer
  14.     requestchoice >NIL: TITLE "" BODY "You must CD to where this script resides.*NNot installing." GADGETS OK
  15.     quit
  16. endif
  17.  
  18. echo >T:0 "0"
  19.  
  20. requestchoice >t:OKCancel TITLE "" BODY "SCSI-CD Software Installer.*NRequires a SCSI-2 CD-ROM Drive*NYou must know device name & unit (see Readme)*NWill Overwrite Devs/DosDrivers/CD0 if any*Nand update other system files.*NContinue?" GADGETS OK CANCEL
  21.  
  22. fileeq t:0 T:OKCancel >NIL:
  23. IF WARN
  24.  
  25.     requeststring >devs:cd.device.config TITLE "" BODY "Select SCSI Device Name" LABEL "Device:" DEFAULT "2nd.scsi.device"
  26.  
  27.     IF NOT WARN
  28.         requestchoice >t:SCSIUnit TITLE "" BODY "Select SCSI ID of CD-ROM UNIT" GADGETS 0 1 2 3 4 5 6 7
  29.  
  30.         fileeq t:0 t:SCSIUnit >NIL:
  31.         IF NOT WARN
  32.             echo >t:Unit 7
  33.         ELSE
  34.             eval <t:SCSIUnit >nil: to t:Unit value2=1 op=- ?
  35.         ENDIF
  36.  
  37.         type >>devs:cd.device.config t:Unit
  38.  
  39.     execute installifnewer /devs/cd.device devs:cd.device devs:
  40.     execute installifnewer /l/CDFileSystem l:CDFileSystem  l:
  41.  
  42.         copy /devs/DOSDrivers/CD0#? DEVS:DOSDrivers quiet
  43.  
  44.  
  45.         requestchoice >t:OKCancel TITLE "" BODY "Select Volume or Location for nonvolatile drawer*NYou may wish to insert a uniquely named floppy NOW" GADGETS OK CANCEL
  46.  
  47.         fileeq t:0 T:OKCancel >NIL:
  48.  
  49.     IF WARN
  50.  
  51. lab tryagain
  52.            requestfile >t:NVDrawer DRAWER SYS: TITLE "Select Volume/Location for Nonvolatile" DRAWERSONLY SAVEMODE
  53.  
  54.        assign oldcd{$$}: ""
  55.        cd `type t:NVDrawer`
  56.        if not exists nonvolatile
  57.         makedir nonvolatile
  58.        endif
  59.  
  60.        cd oldcd{$$}:
  61.        assign oldcd{$$}:
  62.  
  63.        ;remove linefeed and quotes, add "nonvolatile" part of path
  64.            strip t:NVDrawer t:temp 10
  65.        strip t:temp t:NVDrawer 34
  66.        echo >>t:NVDrawer "nonvolatile"
  67.                     
  68.            IF NOT EXISTS SYS:Prefs
  69.                makedir SYS:Prefs
  70.            ENDIF
  71.            IF NOT EXISTS SYS:Prefs/env-archive
  72.                makedir SYS:Prefs/env-archive
  73.            ENDIF
  74.            IF NOT EXISTS SYS:Prefs/env-archive/sys
  75.                makedir SYS:Prefs/env-archive/sys
  76.            ENDIF
  77.            copy t:NVDrawer SYS:Prefs/env-archive/sys/nv_location
  78.  
  79.        execute installifnewer /libs/lowlevel.library libs:lowlevel.library libs:
  80.            execute installifnewer /libs/nonvolatile.library libs:nonvolatile.library libs:
  81.  
  82.            mount >nil: CD0:
  83.  
  84.            requestchoice >t:OKCancel TITLE "" BODY "AmigaCD Installation Complete" GADGETS Ok
  85.  
  86.         ENDIF ;NV-RAM
  87.  
  88.         delete  t:0          quiet
  89.         delete  t:OKCancel   quiet
  90.         delete  t:temp       quiet
  91.         delete  t:NVDrawer   quiet
  92.         delete  t:Unit       quiet
  93.         delete  t:SCSIUnit   quiet
  94.     delete  t:ver1{$$}   quiet
  95.     delete  t:ver2{$$}   quiet
  96.  
  97.     ENDIF ; scsi.device name
  98.  
  99. ENDIF ;installer
  100.